package com.freshmarket.freshmarket.dao;

import com.freshmarket.freshmarket.entity.UserCoupon;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Squirrel
 * @since 2020-09-04
 */
public interface UserCouponMapper extends BaseMapper<UserCoupon> {
    //通过用户id查询优惠券
    public UserCoupon selectByUserId(@Param("userId") Integer userId, @Param("couponId") Integer couponId)throws Exception;

    public List<UserCoupon> selectByUserIdAndCoupId(@Param("userId") Integer userId, @Param("couponId") Integer couponId)throws Exception;


    List<Integer> selectCouponIdByUserId(int userId);
}
